package com.esri.core.tasks.na;

/* loaded from: classes.dex */
class NetworkAnalystException extends RuntimeException {
    private static final long serialVersionUID = 1;
    private String mMessage;

    public NetworkAnalystException(SolveCondition[] solveConditionArr, RouteParameters routeParameters) {
        String[] messagesForCondition;
        StringBuilder sb = new StringBuilder();
        for (SolveCondition solveCondition : solveConditionArr) {
            if (solveCondition != null && (messagesForCondition = solveCondition.getMessagesForCondition(routeParameters)) != null) {
                for (String str : messagesForCondition) {
                    sb.append(str + "\n");
                }
            }
        }
        this.mMessage = sb.toString();
    }

    public NetworkAnalystException(String str) {
        this.mMessage = str;
    }

    @Override // java.lang.Throwable
    public String getMessage() {
        return this.mMessage;
    }
}
